package com.itheima.pojo;

import com.itheima.anno.State;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;

/**
 * (Article)实体类
 *
 * @author makejava
 * @since 2024-06-19 00:04:04
 */
@Data
public class Article {

    private Integer id;
    @NotBlank
    @Pattern(regexp = "^.{1,10}$")
    private String title;
    @NotBlank
    private String content;
    @NotBlank
    @URL
    private String coverImg;
    @State
    private String state;
    @NotNull
    private Integer categoryId;

    private Integer createUser;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

}

